import unittest

from parameterized import parameterized

from build_data import build_data


def login(username, password):
    if username == 'admin' and password == '123456':
        return '登录成功'
    else:
        return '登录失败'

class TestLogin(unittest.TestCase):
    @parameterized.expand(build_data())
    def test_login(self,username,password,code,message):
        result=login(username,password)
        self.assertEqual(message,result)
